﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DateControls.TestWebSite
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void BtnTest_Click(object sender, EventArgs e)
        {
            var b1 = testDatePicker.IsValid;
            var b2 = testDateTextBox.IsValid;
            var b3 = testDateTimePicker.IsValid;

            Label2.Text = string.Format("Valido:{0} Valor: {1}", b1.ToString(), (b1) ? testDateTextBox.Value.ToString() : "NA");
            Label1.Text = string.Format("Valido:{0} Valor: {1}", b2.ToString(), (b2) ? testDatePicker.Value.ToString() : "NA");
            Label3.Text = string.Format("Valido:{0} Valor: {1}", b3.ToString() ,(b3) ? testDateTimePicker.Value.ToString() : "NA");
        }

        protected void Test_Click(object sender, EventArgs e)
        {
            testDateTimePicker.Text = TestTxt.Text;
        }
    }
}
